package com.open.capacity.points.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.common.model.PointsLog;
import com.open.capacity.points.dto.DateQuery;
import com.open.capacity.points.dto.PointsLogDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface PointsLogDao extends BaseMapper<PointsLog> {

    Integer selectCurrentPointsByUserId(Long userId);

    Integer selectCurrentPointsByUsername(String username);

    Integer selectPointsByCondition(@Param("userId") Long userId, @Param("pointsRuleType") String pointsRuleType, @Param("dateQuery") DateQuery dateQuery);

    List<PointsLogDto> selectPointsLogByCondition(Map<String, Object> params);
}
